<% content_for :head do %>
	<script type="text/javascript">					
    $(function(){
      $.preload('.big-images img', {
				placeholder:"<%= image_path('big_missing.gif') %>",
				notFound:"<%= image_path('big_missing.gif') %>"
			});
    });
	</script>
<% end %>

<% unless @houses.blank? %>
    <div id="content">
    	  <div><%= page.body %></div>
        <div class="custom-line"></div>
        <div>
            <% if @houses.size != 0 then %>
                <p class="search-header-title">
                    <%= link_to all_link, :controller => :main, :action => action_name %>
                </p>
                <div class="clearer"></div>
                  <% iterator = 0 %>
                  <% for i in 0...@houses.size %>
                      <% if @houses[i].photos.size > 0 %>
                          <% value = render_big_image(@houses[i], iterator, house_type) %>
                          <% if value != -1 %>
                              <%= value %>
                              <% iterator += 1 %>
                          <% end %>
                      <% end %>
                  <% end %>
                  <div class="clearer">&nbsp;</div>
            <% else %>
                <p>По вашему запросу ничего не найдено</p>
            <% end %>
        </div>
        <%= will_paginate @houses, :update => "content" %>
        <div><%= page.bottom %></div>
    </div>
<% else %>
    <div id="content">
  	  <div><%= page.body %></div>
    </div>
<% end %>

